<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCounterEnquiriesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('counter_enquiries', function (Blueprint $table) {
            $table->increments('id');

            $table->integer('enquiry_id')->unsigned()->comment('采购商询盘信息 ID');
            $table->integer('amount')->unsigned()->comment('最大可供应数量');
            $table->string('contact_name')->comment('联系人名称');
            $table->string('contact_phone')->comment('联系人电话号码');

            $table->integer('province_id')->unsigned()->comment('省份 ID');
            $table->integer('city_id')->unsigned()->comment('市区 ID');
            $table->integer('country_id')->unsigned()->comment('乡镇 ID');

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('counter_enquiries');
    }
}
